<style type="text/css">
body{background:#eee}
.storelogo img{width:3.2rem;height:3.2rem}
.merchgroup .store-star {padding:0.1rem 0 0.2rem 0;font-size:0.65rem;line-height:1rem}
.merchgroup .store-star img{height:0.66rem}
.star-on,.star-off{position:absolute;top:1rem;left:0;overflow:hidden}
.star-rate {margin-left:0.2rem;color:#19b955}
.store-distance{float:right;color:#999}
.store-moneylimit{font-size:0.65rem}
</style>
<div class="fui-page  fui-page-current page-goods-list">
	<div id="carousel-container" class="carousel slide" data-role="carousel" data-param-auto="true">
			<div class="carousel-inner" role="listbox" style="height:6rem">
			<div ng-class="{'item':1,'active':$index==0}" ng-repeat="item in pagedata.adv">
				<a ng-click="access_json(item.url)">
					<img src="{{tomedia(item.image) || '../core/resource/images/banner-1.jpg'}}" style="display: block; width: 100%; height: 100%;">
				</a>
			</div>
			</div>
				<style>
						.fui-swipe-page .fui-swipe-bullet {background: {background}; opacity: {opacity};}
						.fui-swipe-page .fui-swipe-bullet.active {opacity: 1;}
				</style>
				<div id="carousel-jinyun" class="fui-swipe-page" style="padding: 0 5px; bottom: 10px; ">
					<div class="fui-swipe-bullet" ng-repeat="item in pagedata.adv" ng-class="{'active':$index==0}" data-target="#carousel-container" data-slide-to="{{$index}}"></div>
				</div>
	</div>
	<div style="padding:0 0.5rem">
	<div class="fui-cellone" style="padding:0.3rem 0.1rem;padding-top:0.5rem;">
				 <div class="fui-cellone-info">
					<div class="search-input" style="height:1.6rem">
						<form action="javascript:return true">
						<i id="searchsub" class="icon icon-sousuo1 bold" ng-click="getlist()" style="line-height: 1.7rem;"></i>
						<input type="search" placeholder="输入关键字" class="search" ng-model="pagedata.keyword" style="height:1.6rem;border: 0;text-align: left; color: #999; font-size:0.6rem;background:#fff;border-radius: 1rem;" />
						</form>
					</div>
				 </div>
				 <div class="fui-cellone-remark noremark">
					<span style="margin-left:0.3rem;font-size: 0.75rem;" ng-click="getlist()">搜索</span>
				 </div>
	</div>
	<div class="fui-list-group merchgroup" ng-repeat="item in pagedata.list" style="border-radius:0.3rem">
            <div class="fui-list" ng-click="access_json('jy_cmspinche/detail/main/type=1&id='+item.id)">
                <a class="fui-list-inner" style="margin-top:0.16rem">
                    <div class="title" style="font-size:0.86rem"><span>{{item.title}}</span></div>
                    <div class="store-star">
						<span style="font-size:0.55rem">出发地：{{item.start}}</span>
						<span class="store-distance"> {{item.self}}</span>
						  <span class="store-distance"> 人数：{{item.people}} &nbsp;</span>
						<span class="star-rate"></span>
					</div>
					<div class="subtitle" style="font-size:0.65rem">
						<div class="store-moneylimit">
						  <span style="font-size:0.55rem">目的地：{{item.end}}</span>					  
						  <span class="store-distance"> 电话：{{item.mobile}}</span>
						  <span class="store-distance"> 联系人：{{item.name}} &nbsp;</span>
						</div>
					</div>
                </a>
            </div>
			
	</div>
	<div ng-show="loading" class='infinite-loading'><span class='fui-preloader'></span><span style="margin-left:1.5rem"> 正在加载...</span></div>
	<div class="content-empty" ng-if="pagedata.list == ''">
		  <i class="icon jinyunicon icon-cry" style="width: 6rem;margin-bottom: 0.5rem;"></i><br/><p style="color: #999;font-size: .75rem">暂时没有内容！</p>
	</div>
	</div>
</div>

<div ng-include="sys_html('_menu')"></div>
<script type="text/javascript">	
require(['bootstrap', 'hammer'], function($, Hammer){
		$('#carousel-container').carousel();
		var mc = new Hammer($('#carousel-container').get(0));
		mc.on("panleft", function(ev) {
			$('#carousel-container').carousel('next');
		});
		mc.on("panright", function(ev) {
			$('#carousel-container').carousel('prev');
		});
	});
scope.scroll(function(){
		scope.$apply();
		setTimeout('getlist()',2000);
	},false,'svposttext');
getlist();
var page = 1;
function getlist(){
	if(scope.pagedata.keyword!=null){
		var params = {
					'plugin':'jy_cmspinche',
					'action':'index',
					'op':'list',
					'data':{
						'page':page,
						'key':scope.pagedata.keyword
					},
					'callback':function(data){
							if(data.error !=1){
							 for (var i=0;i<data.list.length;i++){
									scope.pagedata.list.push(data.list[i]);
								}
								if(page >1){
									$("#listitem").animate({scrollTop:0},300);
								}
								page++;
								scope.loading = false;
								window.scope.pagedata.list=data.list;
								scope.$apply();
							}else{
								onsole.log('error');
							};
					}
		}
		
	}else{
	var params = {
					'plugin':'jy_cmspinche',
					'action':'index',
					'op':'list',
					'data':{
						'page':page,
					},
					'callback':function(data){
							if(data.error !=1){
							 for (var i=0;i<data.list.length;i++){
									scope.pagedata.list.push(data.list[i]);
								}
								if(page >1){
									$("#listitem").animate({scrollTop:0},300);
								}
								page++;
								scope.loading = false;
								window.scope.pagedata.list=data.list;
								scope.$apply();
							}else{
								onsole.log('error');
							};
					}
		}
	}
	scope.post_json(params);
}

   
</script>